<template>
    <div class="third-source">
        <div class="source-header">
            <p class="source-header-title animated shake">实用网站</p>
        </div>
        <div class="source-content">
            <div class="row">
                <div class="col-sm-6 col-md-4" v-for="item in websiteList" :key="item.id">
                    <div class="thumbnail">
                        <img :src="item.img_url" alt="...">
                        <div class="caption source-intro">
                            <h4>{{item.name}}</h4>
                        </div>
                        <p style="height: 80px;overflow: auto">{{item.intro}}</p>
                        <a :href="item.visit_link" class="btn btn-xs btn-block btn-primary"
                           style="width: 70px;margin: 0 auto;"
                           target="_blank"
                        >我去康康</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import {websiteList} from './list'

    export default {
        name: "index",
        data() {
            return {
                websiteList: []
            }
        },
        created() {
            this.getWebsiteList();
        },
        methods: {
            getWebsiteList() {
                this.getAxios('/website/all').then(res=>{
                    this.websiteList = res.list
                })
            }
        }
    }
</script>

<style scoped>

</style>